The present invention is related to a method and a device for monitoring the flow of data packets on a transmission line having several channels and in particular for prohibiting data packets for each channel from being transmitted with an intensity, which is too high and not allowed. In other words, for time divided data packet traffic having several channels on a line the band width for each channel should always be preserved and not be exceeded.
Leaky Bucket (LB) is a prior art method for monitoring the band width for an incoming stream of data packets or cells, which for instance are forwarded in a network of the ATM type (Asynchronous Transfer Mode), and it is described in the U.S. Pat. No. 5,014,260 claiming convention priority from the Swedish patent application SE 8803875-7 with publication number 462360, said U.S. patent being expressly incorporated by reference herein.
Other prior art relevant to the invention appears from the patent documents EP-A1-0 381 275, EP-A1-0 275 678, WO-A1-90/05416, U.S. Pat. Nos. 4,896,316, 4,993,024, EP-A1-0 310 173, EP-A1-0 387 958, EP-A2-0 384 758, EP-A1-0 383 660.
In the prior methods counters are provided for each channel. All these counters are decreased regularly in time with a value, which is predetermined for each channel. When a data packet arrives, the identity or number of the channel is determined, to which the packet belongs, and then the counter value of this channel is checked or inspected. If the counter value is larger than a threshold value, which is predetermined for said channel, the data packet is discarded or lost and is thus not forwarded on the transmission line. Otherwise the counter value for this channel is incremented with a value particular for said channel and the data packet is forwarded on the transmission line.
By means of this prior process one parameter for the channel rate or band width can be monitored, e.g. the peak rate or the mean rate. With a small threshold value the peak rate may be monitored and with a larger threshold value an upper limit of the mean rate may be monitored. By combining two processes of this kind, providing a so called Dual Leaky Bucket, the peak and mean rate for a channel can be monitored. If any one of the respective threshold values is exceeded, the present data packet is discarded or lost.
In this prior method the whole process is performed in real time without any buffering of several data packets taking place. Instead there is only one register or memory unit containing one data packet each time. When the data packet has arrived to this register, it is immediately decided by the comparison described above, if the data packet is to be forwarded. When the number of channels being used on the transmission line is large, there may be difficulties of having time for the various calculations which are required in the above method. Particularly time consuming is the step of decrementing, in certain short time intervals, the count values for the various channels by a decrement value depending on each channel. If the number of channels for instance is so large as several hundreds, it may be impossible to have time for all these calculations. A possibility would then be to provide individual counter circuits for each channel, i.e. one hardware counter for each channel. For cost reasons this solution may be impossible.